<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script>
        /**
         * 原生JavaScript
         */ 
        window.onload = function(){
            var obj = document.getElementById('hello') // DOM对象
            console.log(obj.innerText)
        }

        /**
         * jQuery
         */
        // 当页面加载完成后执行
        $(function(){
            // var obj = $('#hello') // jQuery对象
            // console.log(obj.text())
            console.log($('#hello').text())
        })

        
    </script>
</head>
<body>
    <div id="hello">嘿嘿</div>
</body>
</html>